package com.wind.taobao.api.trade.trade.rest
{
	import com.wind.taobao.api.IPrivateAPI;
	import com.wind.taobao.core.exception.InvalidRequestParametersException;
	import com.wind.taobao.core.util.TaobaoUtils;
	import com.wind.taobao.core.webservice.TaobaoRequest;

	import flash.utils.ByteArray;

	/**
	 * taobao.refund.message.add Request
	 * @author fxy
	 *
	 */
	public class RefundMessageAddRequest extends TaobaoRequest implements IPrivateAPI
	{
		public override function get method():String
		{
			return "taobao.refund.message.add"
		}
		/**
		 * Y 	 留言内容。最大长度: 400个字节
		 */
		[Bindable]
		public var content:String;
		/**
		 * Y 	用户的登录名
		 */
		[Bindable]
		public var owner_nick:String;
		/**
		 * Y 	退款ID。Refund的Id
		 */
		[Bindable]
		public var refund_id:String;
		/**
		 * N 	图片（凭证）。类型: JPG,GIF;最大为: 500K
		 */
		[Bindable]
		public var image:ByteArray;

		public override function validate():void
		{
			if (!TaobaoUtils.hasAllValue([content, owner_nick, refund_id, image]))
			{
				throw new InvalidRequestParametersException("请求参数[content, owner_nick,refund_id,image]不能为空");
			}
		}
	}
}